Platform Explorer / Nuxeo Platform LTS 2019 10.10

Extension point fileSystemItemFactory

Documentation

This extension point lets you contribute custom FileSystemItem factories according to a document type or facet.

Example of the DefaultFileSystemItemFactory:

    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
        <fileSystemItemFactory
            class="org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory"
            name="defaultFileSystemItemFactory" order="50">
            <parameters>
                <parameter name="versioningDelay">3600</parameter>
                <parameter name="versioningOption">MINOR</parameter>
            </parameters>
        </fileSystemItemFactory>
    </extension>

Please note that `versioningDelay` and `versioningOption` parameter have been deprecated since 9.1 and are not used anymore as automatic versioning is now handled at versioning service level.

Example of a FileSystemItem factory for documents with the Picture facet:

    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
        <fileSystemItemFactory
            class="org.nuxeo.drive.sample.PictureFileSystemItemFactory"
            facet="Picture" name="picture" order="100"/>
    </extension>

Contribution Descriptors

  • Class: org.nuxeo.drive.service.impl.FileSystemItemFactoryDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-drive-core-10.10-HF21.jar /OSGI-INF/nuxeodrive-adapter-contrib.xml
    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
    
        <fileSystemItemFactory class="org.nuxeo.drive.service.impl.CollectionSyncRootFolderItemFactory" facet="Collection" name="collectionSyncRootFolderItemFactory" order="5"/>
        <fileSystemItemFactory class="org.nuxeo.drive.service.impl.DefaultSyncRootFolderItemFactory" facet="DriveSynchronized" name="defaultSyncRootFolderItemFactory" order="10"/>
        <fileSystemItemFactory class="org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory" name="defaultFileSystemItemFactory" order="50"/>
    
      </extension>
  • nuxeo-drive-core-10.10-HF21.jar /OSGI-INF/nuxeodrive-hierarchy-userworkspace-adapter-contrib.xml
    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
    
        <!-- Synchronization root parent factory: order before the "userWorkspaceSyncRootFactory" 
          that has an order of 40 and before the "defaultFileSystemItemFactory" that 
          has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.userworkspace.factory.UserWorkspaceSyncRootParentFactory" name="userWorkspaceSyncRootParentFactory" order="30">
          <parameters>
            <parameter name="folderName">My synchronized folders</parameter>
          </parameters>
        </fileSystemItemFactory>
    
        <!-- Synchronization root factory: order before the "defaultFileSystemItemFactory" 
          that has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.userworkspace.factory.UserWorkspaceSyncRootFactory" facet="DriveSynchronized" name="userWorkspaceSyncRootFactory" order="40">
          <parameters>
            <parameter name="syncRootParentFactory">userWorkspaceSyncRootParentFactory
            </parameter>
          </parameters>
        </fileSystemItemFactory>
    
      </extension>
  • nuxeo-drive-core-10.10-HF21.jar /OSGI-INF/nuxeodrive-hierarchy-permission-adapter-contrib.xml
    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
    
        <!-- User synchronization root parent factory (user workspace): order 
          before the "permissionSyncRootFactory" that has an order of 40 and before 
          the "defaultFileSystemItemFactory" that has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.permission.factory.UserSyncRootParentFactory" name="userSyncRootParentFactory" order="30">
          <parameters>
            <parameter name="folderName">My Docs</parameter>
          </parameters>
        </fileSystemItemFactory>
    
        <!-- Synchronization root factory: order before the "defaultFileSystemItemFactory" 
          that has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.permission.factory.PermissionSyncRootFactory" facet="DriveSynchronized" name="permissionSyncRootFactory" order="40">
          <parameters>
            <parameter name="requiredPermission">Read</parameter>
            <parameter name="userSyncRootParentFactory">userSyncRootParentFactory</parameter>
            <parameter name="sharedSyncRootParentFactory">
              sharedSyncRootParentFactory
            </parameter>
          </parameters>
        </fileSystemItemFactory>
    
        <!-- Shared synchronization root parent factory -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.permission.factory.SharedSyncRootParentFactory" name="sharedSyncRootParentFactory" order="100">
          <parameters>
            <parameter name="folderName">Other Docs</parameter>
          </parameters>
        </fileSystemItemFactory>
    
      </extension>